package org.dromara.mall.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.mybatis.core.domain.BaseEntity;

import java.io.Serial;
import java.util.List;

/**
 * 商品分类对象 mall_goods_category
 *
 * @author MrLei
 * @date 2024-05-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("mall_goods_category")
public class MallGoodsCategory extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 分类id
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 分类名称
     */
    private String name;

    /**
     * 图片
     */
    private String image;

    /**
     * 父分类id
     */
    private Long parentId;

    /**
     * 显示状态
     */
    private Integer status;

    /**
     * 排序
     */
    private Long sort;

    /**
     * 删除标记
     */
    private Integer isDelete;
    @TableField(exist = false)
    private List<MallGoodsCategory> children;


}
